package com.fate.securecheckplatform.net;

import com.fate.securecheckplatform.bean.AppVersionEntity;
import com.fate.securecheckplatform.bean.TableForbiddenType;
import com.fate.securecheckplatform.bean.TerminalInfoEntity;
import com.fate.securecheckplatform.bean.UserEntity;

import java.util.List;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Author:   RandBII
 * DATE:   2020/1/7
 * Description: 接口
 */
public interface ApiService {


    @POST(UrlConstant.GET_ALL_USER)
    Observable<BaseResponse<List<UserEntity>>> getAllUser();

    @FormUrlEncoded
    @POST(UrlConstant.GET_TERMINAL_INFOS)
    Observable<BaseResponse<List<TerminalInfoEntity>>> getTerminalInfos(@Field("ip") String ip);

    @FormUrlEncoded
    @POST(UrlConstant.NEW_VERSION)
    Observable<BaseResponse<AppVersionEntity>> getVersionInformation(@Field("version") String version,
                                                                     @Field("types") int type);

    @POST(UrlConstant.OBJECT_DANGER_TYPE)
    Observable<BaseResponse<List<TableForbiddenType>>> getTingsType();

    @POST(UrlConstant.UP_LOAD)
    Observable<BaseResponse<String>> uploadData(@Body RequestBody body);


}
